var slideImgBorderP2 = document.getElementById("slide_imgborder_page2")
//点击生成试卷
function clickFunP2(){
	//点击出现
	$("#obtn_page2 .generatepaper_page2").click(function(){
		$("#open_exam_page2").css("display","block");
	});
	//关闭
	$("#exam_rule_page2 .close_exam_page2").click(function(){
		$("#open_exam_page2").css("display","none");
	});
	//取消
	$("#exam_cancleBtn_page2").click(function(){
		$("#open_exam_page2").css("display","none");
	});
}
clickFunP2();
//滑块
function slideMoveP2(){
	slideImgBorderP2.onmousedown = function(event){
		var ev1 = event || window.event;
		var wuchaX = ev1.clientX - this.offsetLeft;
		if (ev1.preventDefault) {
			ev1.preventDefault();
		}
		else{
			ev1.returnValue = false; 
		}
		document.onmousemove = function(event){
			var ev2 = event || window.event;
			var slideLeft = ev2.clientX - wuchaX;
			if (slideLeft <= 0) {
				slideLeft = 0;
			}else if(slideLeft >= 480){
				slideLeft = 480;
			}
			slideImgBorderP2.style.left = slideLeft + "px";		
		}
	}
	document.onmouseup = function(){
		document.onmousemove = null;
	}
}
slideMoveP2();
//form提交
$("#exam_subBtn_page2").click(function(){
	$("#formPage2").submit();
});





